package com.zhuxulin.nokia;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;

public class OrderWinDetail implements CommandListener {
	private Display dis = null;
	private List msgList = null;
	public Command backCMD;
	private Displayable parent;
	private String loginName;
	private String passwordP;
	private String msg;

	public OrderWinDetail(Display dis, Displayable parent, String loginName, String password, String msg) {
		this.dis = dis;
		this.parent = parent;
		this.loginName = loginName;
		this.passwordP = password;
		this.msg = msg;
		init();
	}

	private void init() {
		if (this.dis != null) {
			String[] msgArr = StringUtils.split(this.msg, "@");
			this.msgList = new List("Order Detail", 3, msgArr, null);
			this.backCMD = new Command("Back", 2, 1);
			this.msgList.addCommand(this.backCMD);
			this.msgList.setCommandListener(this);
			this.dis.setCurrent(this.msgList);
		}
	}

	public void commandAction(Command cmnd, Displayable dsplbl) {
		if (cmnd == this.backCMD)
			this.dis.setCurrent(this.parent);
	}
}